<template>
  <svg aria-hidden="true">
    <use :xlink:href="symbolId" :fill="color"/>
  </svg>
</template>

<script setup lang="ts">
import {computed} from 'vue'

const props = withDefaults(
    defineProps<{
      name: string
      color?: string
    }>(),
    {
      color: 'currentColor'
    }
)

const symbolId = computed(() => `#${props.name}`)
</script>
